﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Infrastructure
{
    public class EntityFieldUniqueException : Exception
    {
        private string code = null;

        private string fieldName = string.Empty;

        public EntityFieldUniqueException(string code, string fieldName, string message) : this(code, fieldName, message, null)
        {
        }

        public EntityFieldUniqueException(string code, string fieldName, string message, Exception innerException) : base(message, innerException)
        {
            this.fieldName = fieldName;
            this.code = code;
        }

        public string FieldName
        {
            get { return fieldName; }
        }

        public string Code
        {
            get { return code; } 
        }
    } 
}
